from rest_framework import serializers
from .models import MapLocation


class MapLocationSerializer(serializers.ModelSerializer):
    """
    地图位置序列化器
    """
    class Meta:
        model = MapLocation
        fields = ['id', 'name', 'address', 'latitude', 'longitude', 'description', 'category', 'created_at']
        read_only_fields = ['id', 'created_at']